<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>京东商城</title>
    <link rel="stylesheet" href="swiper/swiper.css">
    <style>
        .demo{
            width: 400px;
            height: 300px;
            border: 1px solid #000;
            margin: 0 auto;
        }
        div.item{
            width: 100%;
            height: 100%;
        }
    </style>
</head>
<body>
    <div class="demo">
        <div class="item">item1</div>
        <div class="item">item2</div>
        <div class="item">item3</div>
    </div>
    <script src="js/jquery-3.4.1.min.js"></script>
    <script src="swiper/swiper.js"></script>
    <script>
        $('.demo').swiper({
            //轮播的内容列表
            contentList: $('.item'),
            //轮播的速度
            autoChangeTime: 1000,
            //轮播的动画类型：fade：淡入淡出  animate：从左到右的轮播
            type: 'animate', //animate
            //是否自动轮播
            isAuto: true,
            //左右按钮的显示状态
            showChangeBtn: 'always',
            //是否显示小圆点
            showSpot: true,
            //小圆点的大小
            spotSize:5,
            //小圆点的位置
            spotPosition:'right',
            //小圆点的颜色
            spotColor:'red',
            //轮播内容的大小
            width:400,
            height:300
        });
    </script>
</body>
</html>